﻿

using Bottle.CommunityForum.DAL;
using Bottle.CommunityForum.IDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bottle.CommunityForum.Factory
{
    public partial class DbSession : IDbSession
    {

        public IAttributesInfoDal AttributesInfoDal
        {
            get { return StaticDalFactory.GetCurrentAttributesInfoDal(); }
        }

        public ICommentsInfoDal CommentsInfoDal
        {
            get { return StaticDalFactory.GetCurrentCommentsInfoDal(); }
        }

        public IFavoritesInfoDal FavoritesInfoDal
        {
            get { return StaticDalFactory.GetCurrentFavoritesInfoDal(); }
        }

        public IMessageInfoDal MessageInfoDal
        {
            get { return StaticDalFactory.GetCurrentMessageInfoDal(); }
        }

        public INodesInfoDal NodesInfoDal
        {
            get { return StaticDalFactory.GetCurrentNodesInfoDal(); }
        }

        public IPageInfoDal PageInfoDal
        {
            get { return StaticDalFactory.GetCurrentPageInfoDal(); }
        }

        public IRoleInfoDal RoleInfoDal
        {
            get { return StaticDalFactory.GetCurrentRoleInfoDal(); }
        }

        public ISettingsInfoDal SettingsInfoDal
        {
            get { return StaticDalFactory.GetCurrentSettingsInfoDal(); }
        }

        public ISettingsTypeInfoDal SettingsTypeInfoDal
        {
            get { return StaticDalFactory.GetCurrentSettingsTypeInfoDal(); }
        }

        public ITagsInfoDal TagsInfoDal
        {
            get { return StaticDalFactory.GetCurrentTagsInfoDal(); }
        }

        public ITopicsAttrInfoDal TopicsAttrInfoDal
        {
            get { return StaticDalFactory.GetCurrentTopicsAttrInfoDal(); }
        }

        public ITopicsInfoDal TopicsInfoDal
        {
            get { return StaticDalFactory.GetCurrentTopicsInfoDal(); }
        }

        public IUserAttrInfoDal UserAttrInfoDal
        {
            get { return StaticDalFactory.GetCurrentUserAttrInfoDal(); }
        }

        public IUserInfoDal UserInfoDal
        {
            get { return StaticDalFactory.GetCurrentUserInfoDal(); }
        }
    public int SaveChanges()
        {
            return DbContextFactory.GetCurrentDbContext().SaveChanges();
        }
    }
}